﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using T4._4.Models;

namespace T4._4.Controllers
{
    public class DefaultController : Controller
    {
        private SchoolEntities _context;
        public ModifyController()
        {
            _context = new SchoolEntities();
        }
        // GET: Default
        public ActionResult Index()
        {
            var courses = _context.Courses.ToList();
            return View(courses);
        }
        [HttpPost]
        public ActionResult Modify(int ID)
        {
            var courses = _context.Courses.Find(ID);
            return View(courses);
        }
    }
}